package com.easyim.rest.controller;

import com.easyim.rest.entity.User;
import com.easyim.rest.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private IUserService userService;


    @PostMapping("/register")
    public ResponseEntity userRegister(@RequestBody User user){
        return ResponseEntity.ok(userService.registerUser(user));
    }


    @PostMapping("updateAvator")
    public ResponseEntity updateAvator(){
        return ResponseEntity.ok("");
    }

}
